﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace ifunction.BaiduBCS.SDK
{
    /// <summary>
    /// </summary>
    [DataContract]
    public class StorageObjectUploadRequest : StorageObjectIdentity, IBucketObject
    {
        /// <summary>
        /// Gets or sets the cache control.
        /// Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
        /// </summary>
        /// <value>The cache control.</value>
        [DataMember]
        public string CacheControl
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the content disposition, which would be used as file name when is downloaded.
        /// </summary>
        /// <value>The content disposition.</value>
        [DataMember]
        public string DownloadFileName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the type of the content.
        /// Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
        /// </summary>
        /// <value>The type of the content.</value>
        [DataMember]
        public string ContentType
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the expired stamp.
        /// Reference: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
        /// </summary>
        /// <value>The expired stamp.</value>
        [DataMember]
        public DateTime? ExpiredStamp
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the permission.
        /// </summary>
        /// <value>The permission.</value>
        [DataMember]
        public StorageObjectPermission Permission
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a value indicating whether [use m d5 as file name].
        /// </summary>
        /// <value><c>true</c> if [use m d5 as file name]; otherwise, <c>false</c>.</value>
        [DataMember]
        public bool UseMD5AsFileName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the bytes.
        /// </summary>
        /// <value>The bytes.</value>
        [DataMember]
        public Byte[] Bytes { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="StorageObjectUploadRequest"/> class.
        /// </summary>
        public StorageObjectUploadRequest()
            : base()
        {
        }
    }
}
